var x = new XMLHttpRequest();
x.open('get', 'http://localhost/?url=' + encodeURIComponent(location.href), true);
x.onload = x.onerror = function() {
console.log('phoned home');
}
x.send(null);